package com.aoorey.service.impl;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aoorey.service.MQProducer;

/**
 * @author Lujx 🐯 🐶 🐼 🦁 ✨
 * @date 创建时间：2017年5月3日
 */
@Service
public class MQProducerImpl implements MQProducer {
	
	@Autowired
	private AmqpTemplate amqpTemplate;

	@Override
	public void sendDataToQueue(String queueKey, Object object) {
		try {
			amqpTemplate.convertAndSend(queueKey, object);
		} catch (Exception e) {
		}

	}

}
